FeedNotificationChannelViewModel

ViewModel preparing and managing data related with the notification channel. since 3.5.0

Constructors

Link copied to clipboard
open fun FeedNotificationChannelViewModel(@NonNull channelUrl: String, @Nullable messageListParams: MessageListParams)
Constructor

Functions

Link copied to clipboard
open fun authenticate(@NonNull handler: AuthenticateHandler)
Tries to connect Sendbird Server and retrieve a channel instance.
Link copied to clipboard
open fun createMessageListParams(): MessageListParams
Creates params for the message list when loading the message list.
Link copied to clipboard
open fun getMessageList(): LiveDataEx<MessageData>
Returns LiveData that can be observed for the list of messages.
Link copied to clipboard
open fun hasNext(): Boolean
Determine whether the data on the next page exists.
Link copied to clipboard
open fun hasPrevious(): Boolean
Determine whether the data on the previous page exists.
Link copied to clipboard
open fun loadInitial(startingPoint: Long): Boolean
Requests the list of BaseMessages for the first time.
open fun loadInitial(startingPoint: Long, @Nullable customTypes: List<String>): Boolean
Link copied to clipboard
open fun loadNext(): List<BaseMessage>
Requests the list of BaseMessages when the page goes to the next.
Link copied to clipboard
open fun loadPrevious(): List<BaseMessage>
Requests the list of BaseMessages when the page goes to the previous.
Link copied to clipboard
open fun markAsRead()
Link copied to clipboard
open fun onChannelDeleted(): LiveData<String>
Returns LiveData that can be observed if the channel has been deleted.
Link copied to clipboard
open fun onChannelUpdated(): LiveData<FeedChannel>
Returns LiveData that can be observed if the channel has been updated.
Link copied to clipboard
protected open fun onCleared()
Link copied to clipboard
open fun onStateChanged(@NonNull source: LifecycleOwner, @NonNull event: Lifecycle.Event)
Called when a state transition event happens.
Link copied to clipboard
open fun sendLogImpression(@NonNull messages: List<BaseMessage>)
Sends the log impression to Sendbird server.
Link copied to clipboard
open fun sendLogViewed(@NonNull messages: List<BaseMessage>)
Sends the log viewed to Sendbird server.

Properties

Link copied to clipboard
open val channel: FeedChannel
Link copied to clipboard
val channelUrl: String
Link copied to clipboard
open val messageListParams: MessageListParams
Link copied to clipboard